<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:p="http://primefaces.org/ui">
       
<h:head>
	<link rel="stylesheet" type="text/css" href="css/cadastroAnunciante.css" />
	
</h:head>

<h:body>

	<div id="topo">
		<h:graphicImage value="img/LogoMarca.png" />
	</div>

	<div id="barraMenu">
		<ul id="barraMenu">
			<a href="home.xhtml"><li class="itemMenu">HOME</li></a>
			<a href="quemSomos.xhtml"><li class="itemMenu">QUEM SOMOS</li></a>
		</ul>

	</div>
	<br />

	<div id="titulo">
		<h1>Seja bem Vindo</h1>
		<h2>Cadastro de Anunciante</h2>
	</div>
	<div id="formCadastro">




		<h:form enctype="multipart/form-data">
					
					
					<p:growl id="messages" showDetail="true" />
					<p:outputLabel value="Logo Marca ..." /> 
		 			<p:fileUpload value="#{anuncianteBean.file}" mode="simple"/>
				<h:panelGrid columns="2">
						
					<p:outputLabel for="surname" value="Nome da Empresa" />
					<p:inputMask id="surname" value="#{anuncianteBean.anunciante.empresa}"  placeholder="Nome da Empresa"  required="true"/>
							
					<p:outputLabel for="surname" value="Página WEB"/>
					<p:inputMask value="#{anuncianteBean.anunciante.paginaWeb}" placeholder="www.exemplo.com" required="true"/>
					
					<p:outputLabel for="surname" value="Seu nome"/>
					<p:inputMask value="#{anuncianteBean.anunciante.nome}"  placeholder="Nome" required="true"/>
					
					<p:outputLabel for="surname" value="E-mail"/>
					<p:inputMask value="#{anuncianteBean.anunciante.email}" placeholder="exemplo@" required="true"/>
					
					<p:outputLabel for="surname" value="Senha"/>
					<p:password value="#{anuncianteBean.anunciante.senha}" required="true"/>
					
					
					<h:outputText  value="Telefone"/>
					<p:inputMask value="#{anuncianteBean.anunciante.telefone1}"/>
		     		
		     		<h:outputText  value="Outro telefone"/>
					<p:inputText value="#{anuncianteBean.anunciante.telefone2}" />
					
					
					
					<p:outputLabel for="surname"  value="CNPJ"/>
					<p:inputText value="#{anuncianteBean.anunciante.cnpj}" required="true"/>
					
					<p:outputLabel for="surname"  value="Categoria"/>
				 	<p:selectOneMenu  value="#{anuncianteBean.categoria.categoria}" required="true">
						<f:selectItem itemLabel="" itemValue="" />
			            <f:selectItem itemLabel="Restaurante" itemValue="Restaurante" />
			            <f:selectItem itemLabel="Churrascaria" itemValue="Churrascaria" />
			            <f:selectItem itemLabel="Bar" itemValue="Bar" />
			            <f:selectItem itemLabel="Pizzaria" itemValue="Pizzaria" />
			            <f:selectItem itemLabel="Lanchonete" itemValue="Lanchonete" />
			            <f:selectItem itemLabel="Sorveteria" itemValue="Sorveteria" />
			            <f:selectItem itemLabel="Restaurante Japones" itemValue="Restaurante Japones" />
			            <f:selectItem itemLabel="Restaurante Chines" itemValue="Restaurante Chines" />
			            <f:selectItem itemLabel="Restaurante e Churrascaria" itemValue="Restaurante e Churrascaria" />
			        
		       		</p:selectOneMenu>
		       
		       		<h:outputText value="Endereço da empresa" />
		       		
		       		<br/>
		       		<br/>
		      		<p:outputLabel for="surname" value="Estado" />
		       		<p:selectOneMenu value="#{anuncianteBean.endereco.estado}" required="true">
		       			<f:selectItem itemLabel="" itemValue="" />
			            <f:selectItem itemLabel="PB" itemValue="PB" />
			            <f:selectItem itemLabel="PE" itemValue="PE" />
			            <f:selectItem itemLabel="CE" itemValue="CE" />
			            <f:selectItem itemLabel="RN" itemValue="RN" />
		     		</p:selectOneMenu>
		       		  	 
		       		<p:outputLabel for="surname"  value="Cidade"/>
					<p:inputText value="#{anuncianteBean.endereco.cidade}" required="true"/>
					
					<p:outputLabel for="surname"   value="Cep"/>
					<p:inputText value="#{anuncianteBean.endereco.cep}" required="true"/>
					
					<h:outputText  value="Bairro"/>
					<p:inputText value="#{anuncianteBean.endereco.bairro}" />
					
					<h:outputText  value="Rua"/>
					<p:inputText value="#{anuncianteBean.endereco.rua}" />
					
					<h:outputText  value="N°"/>
					<p:inputText value="#{anuncianteBean.endereco.numero}" />
					
							
					
				</h:panelGrid>
					
			        <h:commandButton value="Salvar" action="#{anuncianteBean.inserir()}"  ajax="false"/>
			</h:form>

	</div>



	<div id="rodaPe"></div>

</h:body>
</html>